#include <bits/stdc++.h>
using namespace std;
using uint=unsigned int;
using ll=long long;
using ull=unsigned long long;
using i128=__int128;
const int N=1e6+5;

void solve(){
    
    return;
}

int main(){
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr); std::cout.tie(nullptr);
    string s;
    cin>>s;
    int cnt=0;
    for(int i=0;i<s.length();i++){
        if(s[i]=='|'){
            if(cnt!=0&&i!=s.length()-1){
                cout<<cnt<<" ";
            }
            if(cnt!=0&&i==s.length()-1)cout<<cnt<<endl;
            cnt=0;
        }
        if(s[i]=='-')cnt++;
    }

    return 0;
}